<?php
class SP_Helper_Get
{
	static public function get($name,$value=null)
	{
		if( isset($_GET[$name]) )
		{
			if( get_magic_quotes_gpc() )
			{
				return SP_Common_Functions::stripSlashesDeep($_GET[$name]);
			}
			return $_GET[$name];
		}
		return $value;
	}
	
	static public function getArray($names)
	{
		$out=array();
		foreach( $names as $name )
		{
			$out[$name]=self::get($name);
		}
		return $out;
	}
	
	static public function has($name)
	{
		return array_key_exists($name, $_GET);
	}
}